/*
  Name: Stroke
  Description:
  Version: 1.0
  Author: Noritaka Horio
  Website: http://sharedhat.heteml.jp/
*/

int pointX, pointY;

void setup() {
  size(300,165);
  background(#000000);
  smooth();
  noLoop();
  pointX = width / 2;
  pointY = height / 2;
}

void draw() {
  drawA(10, 10);
  drawA(220, 100);
}

void drawA(float pointX, float pointY) {
  for (int i = 0; i < 36; i++) {
    float len = random(30, 240);

    float r = map(i, 0, 36, 0, TWO_PI) - HALF_PI;
    float x = cos(r) * len + pointX;
    float y = sin(r) * len + pointY;

    stroke(#ffffff, random(30, 100));
    strokeWeight(random(1, 3));
    line(x, y, pointX, pointY);
  }
}
